package cn.javapulzzer.libpluzzle;

import java.util.*;

public class Differences {

	static <E> List<E> withoutDuplicates(List<E> original) {
		return new ArrayList<E>(new LinkedHashSet<E>(original));
		}
	public static void main(String[] args) {
		String[] str={"spam","sausage","spam","spam","bacon","spam","tomato","spam"};
		List<String> dupList=withoutDuplicates(Arrays.asList(str));
		for (Iterator it=dupList.iterator();it.hasNext();)
		{
			System.out.println(it.next());
		}
		
	}
}